Public Class OpenLookup
    Inherits System.Web.UI.Page

#Region " Web Form Designer Generated Code "

    'This call is required by the Web Form Designer.
    <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()

    End Sub
    Protected WithEvents lit As System.Web.UI.WebControls.Literal

    'NOTE: The following placeholder declaration is required by the Web Form Designer.
    'Do not delete or move it.
    Private designerPlaceholderDeclaration As System.Object

    Private Sub Page_Init(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Init
        'CODEGEN: This method call is required by the Web Form Designer
        'Do not modify it using the code editor.
        InitializeComponent()
    End Sub

#End Region

    Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        'Put user code to initialize the page here
        If Not Me.IsPostBack Then
            Dim lkID As Integer
            Dim lkdID As Integer
            Dim title As String

            'Try
            '    title = Request("title")
            '    If title <> Nothing AndAlso title.Trim <> "" Then
            '        Page.RegisterStartupScript("title", String.Format("<script>window.document.title='{0}';</script>", title))
            '    End If
            'Catch ex As Exception
            'End Try

            Try
                lkID = CInt(Request("id"))
            Catch
                lkID = 0
            End Try

            If lkID > 0 Then
                Try
                    lkdID = CInt(Request("lkdID"))
                Catch ex As Exception
                    lkdID = 0
                End Try

                lit.Text = String.Format("<iframe src='LookupDataInput.aspx?id={0}&lkdID={1}' name='embeddedFrame' width='100%' height='100%'>" _
                                        , lkID, lkdID)
            Else
                Throw New ApplicationException("Invalid look up ID")
            End If
        End If

    End Sub

End Class
